
clear 

############ Replication code for: Christopher M. Faulkner and Austin C. Doctor. 'Rebel Fragmentation and Child Soldier Recruitment.' International Studies Quarterly ############



########################################  MAIN ANALYSIS  #######################################
logit Csdum dyadidduration terrcont2 centralcontrol2 nr_anystrategy external_exists fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/mainregtable.doc", replace

logit Csdum i.preorgreb, cluster(conflict_id)
outreg2 using "~/Downloads/mainregtable.doc", append

gen crosstab_sample = e(sample)

logit Csdum i.preorgreb dyadidduration terrcont2 centralcontrol2 nr_anystrategy external_exists fightcapacity, cluster(conflict_id)
outreg2 using "~/Downloads/mainregtable.doc", append

logit Csdum i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/mainregtable.doc", append

logit Csdum i.preorgreb dyadidduration terrcont2 centralcontrol2 nr_anystrategy external_exists fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/mainregtable.doc", append

margins, dydx(preorgreb)
margins preorgreb
margins preorgreb, level(90)
margins preorgreb, level(95)


## Table 1: Descriptive Statistics
tab Csdum preorgreb if crosstab_sample == 1


## Table 2: CrossTab of Main Variables
sum Csdum preorgreb dyadidduration terrcont2 centralcontrol2 nr_anystrategy external_exists fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014 if crosstab_sample == 1

#######################################  MANUSCRIPT APPENDIX TABLES ############################################
## Appendix Table 2: IDENTICAL DATA SAMPLE
logit Csdum i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity bdeaths conflictdurationTEST govcs polity2 lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)

gen identical_sample = e(sample)

logit Csdum i.preorgreb if identical_sample == 1, cluster(conflict_id)
outreg2 using "~/Downloads/appidentical.doc", replace

logit Csdum i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity if identical_sample == 1, cluster(conflict_id)
outreg2 using "~/Downloads/appidentical.doc", append

logit Csdum i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014 if identical_sample == 1, cluster(conflict_id)
outreg2 using "~/Downloads/appidentical.doc", append

logit Csdum i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014 if identical_sample == 1, cluster(conflict_id)
outreg2 using "~/Downloads/appidentical.doc", append




## Appendix Table 1: DESCRIPTIVE STATISTICS 
sum if identical_sample==1




## Appendix Table 3: GLOBAL REGION UNIT EFFECTS
logit Csdum i.preorgreb i.Europe i.Africa i.Latinamerica i.Asia i.Middleeast, cluster(conflict_id)
outreg2 using "~/Downloads/appregion.doc", replace

logit Csdum i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity i.Europe i.Africa i.Latinamerica i.Asia i.Middleeast, cluster(conflict_id)
outreg2 using "~/Downloads/appregion.doc", append

logit Csdum i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014 i.Europe i.Africa i.Latinamerica i.Asia i.Middleeast, cluster(conflict_id)
outreg2 using "~/Downloads/appregion.doc", append

logit Csdum i.preorgreb dyadidduration terrcont2 centralcontrol2 nr_anystrategy external_exists fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014 i.Europe i.Africa i.Latinamerica i.Asia i.Middleeast, cluster(conflict_id)
outreg2 using "~/Downloads/appregion.doc", append




## Appendix Table 4: TEMPORAL DEPENDENCY 
gen foundyear2 =.
replace foundyear2 = foundyear^2
gen foundyear3 =.
replace foundyear3 = foundyear^3

logit Csdum preorgreb foundyear foundyear2 foundyear3, cluster(conflict_id)
outreg2 using "~/Downloads/apptime.doc", replace

logit Csdum preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity foundyear foundyear2 foundyear3, cluster(conflict_id)
outreg2 using "~/Downloads/apptime.doc", append

logit Csdum preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014 foundyear foundyear2 foundyear3, cluster(conflict_id)
outreg2 using "~/Downloads/apptime.doc", append

logit Csdum preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014 foundyear foundyear2 foundyear3, cluster(conflict_id)
outreg2 using "~/Downloads/apptime.doc", append





## Appendix Table 5: CONDITIONAL DISTRIBUTION 
logit Csdum preorgreb, cluster(conflict_id)
gen in_sample = e(sample)
tab Csdum preorgreb if in_sample==1





## Appendix Table 6: ALTERNATIVE MEASURE OF DEPENDENT VARIABLE (FORCED RECRUITMENT)
gen force_dum =.
replace force_dum = 0 if forceindex < 1 & !missing(forceindex)
replace force_dum = 1 if forceindex >= 1 & !missing(forceindex)
tab force_dum


logit force_dum i.preorgreb, cluster(conflict_id)
outreg2 using "~/Downloads/appforcedchild.doc", replace

logit force_dum i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity, cluster(conflict_id)
outreg2 using "~/Downloads/appforcedchild.doc", append

logit force_dum i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appforcedchild.doc", append

logit force_dum i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appforcedchild.doc", append




## Appendix Table 7: ALTERNATIVE MEASURE OF DEPENDENT VARIABLE (ORDINAL)
ologit Csindex i.preorgreb, cluster(conflict_id) 
outreg2 using "~/Downloads/appordinal.doc", replace

ologit Csindex i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity, cluster(conflict_id) 
outreg2 using "~/Downloads/appordinal.doc", append

ologit Csindex i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appordinal.doc", append

ologit Csindex i.preorgreb dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appordinal.doc", append





## Appendix Table 8: LIMIT TO ONLY LOOTABLE NATURAL RESOURCES
logit Csdum i.preorgreb, cluster(conflict_id)
outreg2 using "~/Downloads/apploot.doc", replace

logit Csdum i.preorgreb lootable1 dyadidduration terrcont2 centralcontrol2 external_exists fightcapacity, cluster(conflict_id)
outreg2 using "~/Downloads/apploot.doc", append

logit Csdum i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/apploot.doc", append

logit Csdum i.preorgreb lootable1 dyadidduration terrcont2 centralcontrol2 external_exists fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/apploot.doc", append





## Appendix Table 9: GROUP IDENTITY and GOALS
logit Csdum i.preorgreb, cluster(conflict_id)
outreg2 using "~/Downloads/appgroup.doc", replace

logit Csdum i.preorgreb ethnic religious goalauto goalind dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity, cluster(conflict_id)
outreg2 using "~/Downloads/appgroup.doc", append

logit Csdum i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appgroup.doc", append

logit Csdum i.preorgreb ethnic religious goalauto goalind dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appgroup.doc", append




## Appendix Table 10: ADDITIONAL CONTROLS
logit Csdum i.preorgreb, cluster(conflict_id)
outreg2 using "~/Downloads/appcontrols.doc", replace

logit Csdum i.preorgreb polwing armsproc2 lnrebest dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity, cluster(conflict_id)
outreg2 using "~/Downloads/appcontrols.doc", append

logit Csdum i.preorgreb bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appcontrols.doc", append

logit Csdum i.preorgreb polwing armsproc2  lnrebest dyadidduration terrcont2 centralcontrol2 external_exists nr_anystrategy fightcapacity bdeaths conflictdurationTEST govcs polity2 polity2sq lnGLEDrgdppc lnWDI_pop014, cluster(conflict_id)
outreg2 using "~/Downloads/appcontrols.doc", append


